<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <title>用户注册</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <script src="../statics/js/rem.js"></script>
	<script type="text/javascript" src="../statics/js/jquery-1.8.3.min.js" ></script>
    <script src="../statics/js/jquery.min.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="../statics/css/base.css"/>
    <link rel="stylesheet" type="text/css" href="../statics/css/page.css"/>
    <link rel="stylesheet" type="text/css" href="../statics/css/all.css"/>
    <link rel="stylesheet" type="text/css" href="../statics/css/mui.min.css"/>
    <link rel="stylesheet" type="text/css" href="../statics/css/loaders.min.css"/>
    <link rel="stylesheet" type="text/css" href="../statics/css/loading.css"/>
    <link rel="stylesheet" type="text/css" href="../statics/slick/slick.css"/>
	<link rel="stylesheet" type="text/css" href="../statics/css/yz.css"/>


	<script type="text/javascript">
		$(window).load(function(){
			$(".loading").addClass("loader-chanage")
			$(".loading").fadeOut(300)
		})
        var clock = '';
        var nums = 30;
        var btn;
        function sendCode(thisBtn) {
            if($("#phone").val()!=""){
                // alert($("#phone").val());
                $("#getVCode").css("background-color","gray");
                $("#loginmodalt").show();
                btn = thisBtn;
                btn.disabled = true; //将按钮置为不可点击
                btn.value = '重新获取（'+nums+'）';
                clock = setInterval(doLoop, 1000); //一秒执行一次
                //输入正确时
                // 手机获取验证码
                $.ajax({
                    type:"post",
                    url:"<%=path%>/user/getCode.json",
                    data:{"phone":$("#phone").val()},
                    success:function(result){
                        $code=result.getCode;
                    }
                })
            }else
            {
                var layer = layui.layer
                    , form = layui.form;
                layer.msg('请输入手机号码');
                return;
            }
        }

        function doLoop() {
            nums--;
            if (nums > 0) {
                btn.value = '重新获取（'+nums+'）';
            } else {
                $("#getVCode").css("background-color","#f15970");
                clearInterval(clock); //清除js定时器
                btn.disabled = false;
                btn.value = '点击发送验证码';
                nums = 10; //重置时间
            }
        }
	</script>
    <style>
        #register:hover{
            cursor: pointer;
        }
    </style>
</head>
<!--loading页开始-->
<div class="loading">
	<div class="loader">
        <div class="loader-inner pacman">
          <div></div>
          <div></div>
          <div></div>
          <div></div>
          <div></div>
        </div>
	</div>
</div>
<!--loading页结束-->
	<body>
		<div class="headertwo clearfloat" id="header">
			<a href="javascript:history.go(-1)" class="fl box-s"><i class="iconfont icon-arrow-l fl"></i></a>
			<p class="fl">用户注册</p>
		</div>
		<%--<form action="/user/register.html" type="post" name="zhuce">--%>
		<div class="register clearfloat" id="main">
			<ul>
				<li class="clearfloat">
					<p class="tit fl">手机号</p>
					<input type="text" id="phone" value="" class="shuru fl" placeholder="请输入手机号码" name="phone" onkeyup="value=value.replace(/[^\d]/g,'')"/>
				</li>
				<li class="clearfloat">
					<p class="tit fl">验证码</p>
					<input type="text" id="codeYz" value="" class="shuru shurutwo fl" placeholder="请输入短信验证码" />
					<a>
						<input type="button" id="getVCode" value="获取验证码" width="2.5rem" class="btn fr" onclick="sendCode(this)"/>
					</a>
				</li>
				<li class="clearfloat">
					<p class="tit fl">密码</p>
					<input type="password" id="pwd" value="" class="shuru fl" placeholder="请设置密码(6-12位,非单字符,数字,英文)" name="pwd"/>
				</li>
				<li class="clearfloat">
					<p class="tit fl">确认密码</p>
					<input type="password" id="qrpwd" value="" class="shuru fl" placeholder="请再次输入密码" />
				</li>
			</ul>
			<a  class="pay-btn clearfloat" id="register">
				注册
			</a>
			<div class="bottom clearfloat">
				<p class="fl">
					已有账号？
					<a href="sign.jsp">立即登录</a>
				</p>
			</div>
		</div>
	</body>

	<script type="text/javascript" src="../statics/js/jquery.SuperSlide.2.1.js" ></script>
	<script type="text/javascript" src="../statics/js/hmt.js" ></script>
	<script type="text/javascript" src="../statics/js/jquery.leanModal.min.js"></script>
	<script type="text/javascript" src="../statics/js/tchuang.js" ></script>
	<script src="../statics/js-pzz/register.js" type="text/javascript"></script>
	<script src="../statics/layui/layui.all.js"></script>

</html>
